gtk4.git
9 years agotoolbar: Replace button-press-event handler with gesture
Timm Bäder [Fri, 2 Dec 2016 11:39:46 +0000 (12:39 +0100)]
toolbar: Replace button-press-event handler with gesture

9 years agolinkbutton: Replace button-press-event handler with gesture
Timm Bäder [Fri, 2 Dec 2016 11:22:41 +0000 (12:22 +0100)]
linkbutton: Replace button-press-event handler with gesture

9 years agoseparatortoolitem: Remove button-event/motion-event handlers
Timm Bäder [Fri, 2 Dec 2016 10:34:56 +0000 (11:34 +0100)]
separatortoolitem: Remove button-event/motion-event handlers

These only exist for the window dragging which does not exist anymore
currently. It will be reintroduced later in a form that does not require
these handlers.

9 years agosnapshot: Add annotations to parameters/return values
Timm Bäder [Thu, 1 Dec 2016 09:19:24 +0000 (10:19 +0100)]
snapshot: Add annotations to parameters/return values

9 years agowidget: Use gtk_widget_measure to measure widget sizes
Timm Bäder [Mon, 5 Dec 2016 17:19:04 +0000 (18:19 +0100)]
widget: Use gtk_widget_measure to measure widget sizes

9 years agowidget: Remove _gtk_widget_supports_clip
Timm Bäder [Tue, 22 Nov 2016 11:08:07 +0000 (12:08 +0100)]
widget: Remove _gtk_widget_supports_clip

9 years agowidget: Remove gtk_widget_invalidate_style_context
Timm Bäder [Tue, 22 Nov 2016 11:05:48 +0000 (12:05 +0100)]
widget: Remove gtk_widget_invalidate_style_context

9 years agowayland: Sync attributes also when drawing with GL
Benjamin Otte [Tue, 6 Dec 2016 17:01:34 +0000 (18:01 +0100)]
wayland: Sync attributes also when drawing with GL

Probably syncing attributes shouldn't happen when drawing in the first
place, but what do I know about Wayland. ¯\_(ツ)_/¯

9 years agowayland: Uncomment erroneously commented out code
Benjamin Otte [Tue, 6 Dec 2016 16:51:35 +0000 (17:51 +0100)]
wayland: Uncomment erroneously commented out code

I read the code as if (use_gl) instead of if (!use_gl) and commented it
out in bddfd7bb41cebd9b4e8ea418ce4d8e1f11822e81. That broke drawing on
Wayland without OpenGL completely.

Whoops.

Now it's back.

9 years agoGDK/Win32: Fix build after GDKGL refactoring
Chun-wei Fan [Tue, 6 Dec 2016 06:37:42 +0000 (14:37 +0800)]
GDK/Win32: Fix build after GDKGL refactoring

There were some parts that need some updates after the refactoring in
GDKGL, so that the code will continue to build and run.

For gdkwindow-win32.c, comment out the parts where we check for use_gl
(which was removed), since we are going to move all drawing to OpenGL,
but don't remove/disable the whole portion as that transition is not
complete at this point.

There a is new GDKGL function that checks for the damaged area of the back
buffer, but since the notion of "damage" is for *NIX (GLX/EGL for
Wayland/mir), meaning that there is no such extension for Windows in this
regard, so we can't support this on Windows as-is, at least for now.

https://bugzilla.gnome.org/show_bug.cgi?id=773299

9 years agoUpdate POTFILES.in
Piotr Drąg [Mon, 5 Dec 2016 18:46:59 +0000 (19:46 +0100)]
Update POTFILES.in

9 years agobuild: add gir depends for GdkX11, GdkWin32, and Gsk on Gdk
William Hua [Mon, 5 Dec 2016 16:37:20 +0000 (11:37 -0500)]
build: add gir depends for GdkX11, GdkWin32, and Gsk on Gdk

https://bugzilla.gnome.org/show_bug.cgi?id=775651

9 years agomir: fix type warning
William Hua [Mon, 5 Dec 2016 16:06:32 +0000 (11:06 -0500)]
mir: fix type warning

9 years agomir: fix build failures
William Hua [Mon, 5 Dec 2016 15:28:34 +0000 (10:28 -0500)]
mir: fix build failures

9 years agomir: implement display monitor vfuncs
William Hua [Tue, 29 Nov 2016 17:38:47 +0000 (12:38 -0500)]
mir: implement display monitor vfuncs

9 years agogdkgl: Add gdk_gl_context_get_damage()
Benjamin Otte [Sun, 4 Dec 2016 15:33:13 +0000 (16:33 +0100)]
gdkgl: Add gdk_gl_context_get_damage()

This is a way to query the damaged area of the backbuffer.

The GL renderer uses this to compute the extents of that damage region
(computed via buffer age) and use them to minimize the area to redraw.

This changes the semantics of GL rendering to "When calling
gdk_window_begin_frame() with a GL context, the area by
gdk_gl_context_get_damage() needs to be redrawn and every other pixel of
the backbuffer is guaranteed to be correct.
After gdk_window_end_frame() on a GL-drawn window, the whole backbuffer
must be correct.

We can always glXBufferSwap() now because of this.

9 years agoinspector: Add support for displayin the render region
Benjamin Otte [Sun, 4 Dec 2016 15:32:38 +0000 (16:32 +0100)]
inspector: Add support for displayin the render region

Now I just need a UI designer that makes this look nice...

9 years agoglrenderer: Always redraw the whole screen
Benjamin Otte [Sun, 27 Nov 2016 15:37:31 +0000 (16:37 +0100)]
glrenderer: Always redraw the whole screen

9 years agogdk: Make gdk_window_begin_draw_frame() take a draw context
Benjamin Otte [Thu, 1 Dec 2016 00:38:20 +0000 (01:38 +0100)]
gdk: Make gdk_window_begin_draw_frame() take a draw context

... instead of a gl context.

This requires some refactoring in the way we mark the shared context as
drawing: We now call begin_frame/end_frame() on it and ignore the call
on the main context.
Unfortunately we need to do this check in all vfuncs, which sucks. But I
haven't found a better way.

9 years agogskrenderer: Add gsk_renderer_begin_draw_frame()
Benjamin Otte [Sun, 27 Nov 2016 15:21:02 +0000 (16:21 +0100)]
gskrenderer: Add gsk_renderer_begin_draw_frame()

This way, we can hijack the begin/end draw process and do out own
processing before passing it on to GDK.

9 years agoinspector: Pass the drawing context into the recorder
Benjamin Otte [Wed, 30 Nov 2016 17:55:45 +0000 (18:55 +0100)]
inspector: Pass the drawing context into the recorder

That way we can capture both the actual changes (clip region) and the
area that was redrawn (render region), which in OpenGL might not be
identical.

Nothing shows the render region yet though...

9 years agoglrenderer: Always redraw the whole screen
Benjamin Otte [Sun, 27 Nov 2016 15:37:31 +0000 (16:37 +0100)]
glrenderer: Always redraw the whole screen

9 years agogsk: Change GSK_USE_SOFTWARE env var to GSK_RENDERER
Benjamin Otte [Tue, 29 Nov 2016 12:36:31 +0000 (13:36 +0100)]
gsk: Change GSK_USE_SOFTWARE env var to GSK_RENDERER

This way, we can use the variable as more than a boolean flag.

This will be useful for Vulkan or D3D renderers.

9 years agogdk: Turn GdkGLContext into a GdkDrawContext
Benjamin Otte [Mon, 28 Nov 2016 16:36:37 +0000 (17:36 +0100)]
gdk: Turn GdkGLContext into a GdkDrawContext

9 years agogdk: Add GdkDrawContext
Benjamin Otte [Mon, 28 Nov 2016 16:22:35 +0000 (17:22 +0100)]
gdk: Add GdkDrawContext

This will be the base class for GdkVulkanContext and GdkGLContext.

9 years agogdk: Redo GL drawing
Benjamin Otte [Wed, 23 Nov 2016 04:54:50 +0000 (05:54 +0100)]
gdk: Redo GL drawing

Reenable GL drawing, but do it without Cairo.

Now, the context passed to gdk_window_begin_draw_frame() decides how
drawing is going to happen. If it is NULL, Cairo is used like before.

If a context is passed, Cairo may not be used for drawing and
gdk_drawing_context_get_cairo_context() is going to return NULL.
Instead, the GL renderer must draw to the GL backbuffer and
end_draw_frame() is then swapping that to the front.

The GskGLRenderer has lost the texture it used to render to and adapted
to render directly to the backbuffer instead.

The only thing missing is for GtkGLArea to gain back a performant way to
render. But it didn't have one since the introduction of GSK, this
patchset doesn't change anything about it.

The new rendering avoids two indirections (the GSK renderer's texture
and the GDK double buffering surface).
It improves icon count in the fishbowl demo by 30%.

9 years agoglcontext: Make begin/end_draw() paired
Benjamin Otte [Wed, 23 Nov 2016 04:18:43 +0000 (05:18 +0100)]
glcontext: Make begin/end_draw() paired

This way, we can query the GL context's state via
gdk_gl_context_is_drawing().

Use this function to make GL contexts as attached and grant them access
to the front/backbuffer for rendering.

All of this is still unused because GL drawing is still disabled.

9 years agogdk: Large GL refactoring
Benjamin Otte [Wed, 23 Nov 2016 02:32:22 +0000 (03:32 +0100)]
gdk: Large GL refactoring

No visible changes as GL rendering is disabled at the moment.

What was done:

1. Move window->invalidate_for_new_frame to glcontext->begin_frame
This moves the code to where it is used (the GLContext) and prepares it
for being called where it is used when actually beginning to draw the
frame.

2. Get rid of buffer-age usage
We want to let the application render directly to the backbuffer.
Because of that, we cannot make any assumptions about the contents the
application renders outside the clip area.
In particular GskGLRenderer renders random stuff there but not actual
contents.

3. Pass the actual GL context
Previously, we passed the shared context to end_frame, now we pass the
actual GL context that the application uses for rendering. This is so
that the vfuncs could prepare the actual contexts for rendering (they
don't currently).

4. Simplify the code
The previous code set up the final drawing method in begin_frame.
Instead, we now just ensure the clip area is something we can render
and decide on the actual method in end_frame.
This is both more robust (we can change the clip area in between if we
want to) and less code.

9 years agogsk: Allow 0 for gsk_gl_driver_begin_frame()
Benjamin Otte [Wed, 23 Nov 2016 00:03:59 +0000 (01:03 +0100)]
gsk: Allow 0 for gsk_gl_driver_begin_frame()

Special-case this situation to unset the current framebuffer and render
to the backbuffer again.

9 years agogdk: Don't recurse when processing updates
Benjamin Otte [Tue, 22 Nov 2016 20:23:21 +0000 (21:23 +0100)]
gdk: Don't recurse when processing updates

We don't need to send expose events for backwards compatibility anymore.

9 years agogdk: Remove all code that only existed because of use_gl
Benjamin Otte [Tue, 22 Nov 2016 19:03:14 +0000 (20:03 +0100)]
gdk: Remove all code that only existed because of use_gl

Now that we don't use GL anymore, this code is unnecessary.

9 years agogdk: Never draw with GL
Benjamin Otte [Tue, 22 Nov 2016 18:45:04 +0000 (19:45 +0100)]
gdk: Never draw with GL

This is a temporary switch-off of the GL dawing code that will make
things keep running. All GL related code (like the GSK renderer or
GtkGLArea will now fall back to software.

9 years agogskrenderer: Store the GL context
Benjamin Otte [Wed, 23 Nov 2016 05:54:03 +0000 (06:54 +0100)]
gskrenderer: Store the GL context

And use it to create the drawing context with it.

Note that this doesn't yet have any effect and is all infrastructure
preparation work.

9 years agoAPI: Require passing a GLContext to begin_draw_frame()
Benjamin Otte [Tue, 22 Nov 2016 03:12:51 +0000 (04:12 +0100)]
API: Require passing a GLContext to begin_draw_frame()

This is in preparation for requiring explicit passing of GL contexts
when drawing.

9 years agowindow: Change behavior of gdk_window_begin_draw_frame()
Benjamin Otte [Sun, 20 Nov 2016 19:42:37 +0000 (20:42 +0100)]
window: Change behavior of gdk_window_begin_draw_frame()

(1) Require a native window
(2) Create the drawing context before calling begin_paint().

9 years agodrawingcontext: Store the GL paint context
Benjamin Otte [Sun, 20 Nov 2016 19:37:22 +0000 (20:37 +0100)]
drawingcontext: Store the GL paint context

9 years agocssgadget: Compute relative to own allocation, not widget allocation
Benjamin Otte [Tue, 29 Nov 2016 10:32:45 +0000 (11:32 +0100)]
cssgadget: Compute relative to own allocation, not widget allocation

This would lead to clipped gadgets when the gadget allocation differed
from the widget allocation, like in GtkListBox.

9 years agowayland: destroy subsurfaces along with parents
Olivier Fourdan [Wed, 23 Nov 2016 13:45:16 +0000 (14:45 +0100)]
wayland: destroy subsurfaces along with parents

Wayland subsurfaces can have other native window parents, but those need
to be destroyed along with the rest of the window hierarchy otherwise
an assert() is reached.

https://bugzilla.gnome.org/show_bug.cgi?id=774915

9 years agoframe: Use gtk_widget_measure to measure child sizes
Timm Bäder [Sat, 3 Dec 2016 12:32:46 +0000 (13:32 +0100)]
frame: Use gtk_widget_measure to measure child sizes

9 years agoviewport: Use gtk_widget_measure to measure child sizes
Timm Bäder [Thu, 1 Dec 2016 19:10:17 +0000 (20:10 +0100)]
viewport: Use gtk_widget_measure to measure child sizes

and rewrite the adjustment handling in a orientation-agnostic way.

9 years agoscrolledwindow: measure child widgets using gtk_widget_measure
Timm Bäder [Thu, 1 Dec 2016 18:44:02 +0000 (19:44 +0100)]
scrolledwindow: measure child widgets using gtk_widget_measure

9 years agorevealer: Measure child widget size using gtk_widget_measure
Timm Bäder [Thu, 1 Dec 2016 18:33:38 +0000 (19:33 +0100)]
revealer: Measure child widget size using gtk_widget_measure

9 years agoheaderbar: measure children using gtk_widget_measure
Timm Bäder [Thu, 1 Dec 2016 18:29:13 +0000 (19:29 +0100)]
headerbar: measure children using gtk_widget_measure

9 years agowidget-factory: Use GtkButton:icon-name to construct icon buttons
Timm Bäder [Sat, 3 Dec 2016 13:42:05 +0000 (14:42 +0100)]
widget-factory: Use GtkButton:icon-name to construct icon buttons

9 years agotoolpalette: call set_has_window
Timm Bäder [Sun, 4 Dec 2016 10:49:29 +0000 (11:49 +0100)]
toolpalette: call set_has_window

9 years agoprintunixdialog: Remove GtkDrawingArea::draw handler
Timm Bäder [Sun, 4 Dec 2016 10:49:41 +0000 (11:49 +0100)]
printunixdialog: Remove GtkDrawingArea::draw handler

the source file has been updated to use gtk_drawing_area_set_draw_func,
but the draw_cb handler in the ui file is still left.

9 years agostylecontext: Remove a bunch of unneeded headers
Benjamin Otte [Sat, 3 Dec 2016 13:58:21 +0000 (14:58 +0100)]
stylecontext: Remove a bunch of unneeded headers

9 years agoGtkProgressBar: trivial conditional optimisation
Daniel Boles [Sat, 3 Dec 2016 02:35:27 +0000 (02:35 +0000)]
GtkProgressBar: trivial conditional optimisation

I'd hope the compiler would realise this for us, but let's be explicit.

9 years agoentry: Refactor get_icon_pixbuf
Timm Bäder [Fri, 2 Dec 2016 14:16:10 +0000 (15:16 +0100)]
entry: Refactor get_icon_pixbuf

This way it will only return a pixbuf if the icon helper has a pixbuf.

9 years agoiconhelper: Ensure the surface used for textures is ARGB32
Timm Bäder [Fri, 2 Dec 2016 16:32:12 +0000 (17:32 +0100)]
iconhelper: Ensure the surface used for textures is ARGB32

9 years agoiconhelper: Remove allocate implementation
Timm Bäder [Fri, 2 Dec 2016 14:20:39 +0000 (15:20 +0100)]
iconhelper: Remove allocate implementation

9 years agolistbox: Fix row hovering
Timm Bäder [Wed, 30 Nov 2016 10:27:32 +0000 (11:27 +0100)]
listbox: Fix row hovering

GtkListBox is not a windowed widget anymore so we can't use
gtk_widget_get_window. Just directly access priv->view_window instead to
get the right window.

9 years agospinbutton: Remove _get_panels
Timm Bäder [Tue, 22 Nov 2016 20:00:40 +0000 (21:00 +0100)]
spinbutton: Remove _get_panels

9 years agoRemove gtk_widget_get_preferred_height_and_baseline_for_width
Timm Bäder [Wed, 23 Nov 2016 17:05:09 +0000 (18:05 +0100)]
Remove gtk_widget_get_preferred_height_and_baseline_for_width

It's just a wrapper around gtk_widget_measure nowadays.

9 years agotogglebutton: Remove unused defines
Timm Bäder [Mon, 28 Nov 2016 18:32:10 +0000 (19:32 +0100)]
togglebutton: Remove unused defines

9 years agoflowbox: Fix get_child_at_index crash with an invalid index
Debarshi Ray [Fri, 2 Dec 2016 15:38:05 +0000 (16:38 +0100)]
flowbox: Fix get_child_at_index crash with an invalid index

https://bugzilla.gnome.org/show_bug.cgi?id=775525

9 years agoComboBox: Fix the whitespace fix
Daniel Boles [Thu, 1 Dec 2016 12:58:29 +0000 (12:58 +0000)]
ComboBox: Fix the whitespace fix

9 years agoComboBox: Do not select item before menu realised
Daniel Boles [Thu, 1 Dec 2016 12:38:43 +0000 (12:38 +0000)]
ComboBox: Do not select item before menu realised

For a menu mode CB with wrap_width == 0 and an active item, that item is
selected in gtk_combo_box_menu_popup. Selection causes the MenuShell to
activate and hence take a grab. This was done before the menu was popped
up. A patch distributed in Debian sid - after being proposed on our BZ -
revealed that on the 1st popup of any such ComboBox, within grab_add,
the MenuShell's toplevel's GdkWindow is NULL. This causes a Gdk-CRITICAL
assertion fail on the 1st time opening any such CB, on Debian and if
that patch were merged to GTK+. By selecting after popup, we ensure the
MenuShell is realised before its grab_add and so avoid the critical.

https://bugzilla.gnome.org/show_bug.cgi?id=771242

9 years agoComboBox: Fix whitespace
Daniel Boles [Thu, 1 Dec 2016 12:36:30 +0000 (12:36 +0000)]
ComboBox: Fix whitespace

 * Replace tabs for indentation with spaces
 * Remove whitespace at ends of lines

9 years agocssshadows: Fix extents computation
Benjamin Otte [Wed, 30 Nov 2016 22:52:54 +0000 (23:52 +0100)]
cssshadows: Fix extents computation

Someody busted this code a *lot*.

9 years agoimage: Don't translate twice
Benjamin Otte [Wed, 30 Nov 2016 22:03:13 +0000 (23:03 +0100)]
image: Don't translate twice

The animation can pass x/y through to the render_icon() function, so
don't gtk_snapshot_translate() it.

9 years agowayland: Don't warn if we loose the compositor connection
Matthias Clasen [Wed, 30 Nov 2016 18:43:54 +0000 (13:43 -0500)]
wayland: Don't warn if we loose the compositor connection

And instead, exit cleanly. This avoids filling the logs with
these warnings from every single application that has a
connection to the compositor.

9 years agox11: Don't warn if the display is closed
Matthias Clasen [Wed, 30 Nov 2016 18:43:17 +0000 (13:43 -0500)]
x11: Don't warn if the display is closed

This causes a storm of warnings from all applications in the logs
whenever the display goes away, and is not useful.

9 years agogsk: ensure libgsk-4.la before running g-ir-scanner
William Hua [Wed, 30 Nov 2016 15:06:43 +0000 (10:06 -0500)]
gsk: ensure libgsk-4.la before running g-ir-scanner

https://bugzilla.gnome.org/show_bug.cgi?id=775410

9 years agogskrenderer: Add GError argument to gsk_renderer_realize()
Benjamin Otte [Tue, 29 Nov 2016 03:51:07 +0000 (04:51 +0100)]
gskrenderer: Add GError argument to gsk_renderer_realize()

This way, we don't spam criticals when GL is not available. Instead, we
print a useful debug message to stderr and continue with the Cairo renderer.

Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
9 years agogsk: Add gsk_renderer_new_for_window()
Benjamin Otte [Tue, 29 Nov 2016 03:27:21 +0000 (04:27 +0100)]
gsk: Add gsk_renderer_new_for_window()

and remove gsk_renderer_get_for_display().

This new function returns a realized renderer. Because of that, GSK can
catch failures to realize, destroy the renderer and try another one.

Or in short: I can finally use GTK on Weston with the nvidia binary
drivers again.

Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
9 years agogsk: Change gsk_renderer_realize()
Benjamin Otte [Tue, 29 Nov 2016 02:36:33 +0000 (03:36 +0100)]
gsk: Change gsk_renderer_realize()

Instead of having a gsk_renderer_set_window() call, pass the window to
realize(). This way, the realization can fail with the wrong window.

Signed-off-by: Emmanuele Bassi <ebassi@gnome.org>
9 years agogdk: Make GdkDrawingContext not per-backend
Benjamin Otte [Wed, 30 Nov 2016 14:52:22 +0000 (15:52 +0100)]
gdk: Make GdkDrawingContext not per-backend

No backend is using it, and we can put the backend-specific drawing code
into GdkGLContext.

9 years agogdkwindow: Remove unused vfunc
Benjamin Otte [Wed, 30 Nov 2016 14:08:12 +0000 (15:08 +0100)]
gdkwindow: Remove unused vfunc

GdkGLContext knows how to realize itself.

9 years agoflowbox: Size gadget realtive to widget->window
Benjamin Otte [Tue, 29 Nov 2016 10:57:11 +0000 (11:57 +0100)]
flowbox: Size gadget realtive to widget->window

This fixes a few clipping issues and syncs code with GtkListBox.

9 years agolistbox: Move the priv->gadget allocation
Benjamin Otte [Tue, 29 Nov 2016 10:46:32 +0000 (11:46 +0100)]
listbox: Move the priv->gadget allocation

It used to be relative to the window, now it is relative to the widget.

That is necessary so the snapshot fuction doesn't confuse coordinate
systems.

9 years agocairorenderer: Remove nonexisting function from header
Benjamin Otte [Tue, 29 Nov 2016 12:00:48 +0000 (13:00 +0100)]
cairorenderer: Remove nonexisting function from header

9 years agowayland: Check for subsurface looking up the toplevel
Olivier Fourdan [Tue, 29 Nov 2016 13:21:57 +0000 (14:21 +0100)]
wayland: Check for subsurface looking up the toplevel

gdk_window_get_toplevel() walks up the windows tree looking for the
corresponding toplevel window, but needs to account for subsurfaces as
well on Wayland.

https://bugzilla.gnome.org/show_bug.cgi?id=775319

9 years agodemos: Remove undefined function call
Emmanuele Bassi [Tue, 29 Nov 2016 23:29:10 +0000 (23:29 +0000)]
demos: Remove undefined function call

The gtk_container_set_border_width() function has been removed from
the GTK+ 4.x API.

9 years agogtk-demo: Add a demo for tabs
Matthias Clasen [Tue, 29 Nov 2016 21:39:21 +0000 (16:39 -0500)]
gtk-demo: Add a demo for tabs

One of the least-appreciated features in pango.
It deserves a demo.

9 years agoDon't leak a pixbuf reference in dnd
Matthias Clasen [Tue, 29 Nov 2016 19:42:35 +0000 (14:42 -0500)]
Don't leak a pixbuf reference in dnd

https://bugzilla.gnome.org/show_bug.cgi?id=775316

9 years agoFix reference handling in GtkScaleButton
Matthias Clasen [Mon, 28 Nov 2016 20:00:10 +0000 (15:00 -0500)]
Fix reference handling in GtkScaleButton

We were leaking the adjustment, since we confuse ourselves
with a property whose initial value comes out of a template.
Stop doing that.

https://bugzilla.gnome.org/show_bug.cgi?id=775212

9 years agomir: fix build failures
William Hua [Mon, 28 Nov 2016 02:31:21 +0000 (21:31 -0500)]
mir: fix build failures

9 years agodocs: fix a parameter name of GtkEntry::populate-popup
Sébastien Wilmet [Sat, 26 Nov 2016 11:23:14 +0000 (12:23 +0100)]
docs: fix a parameter name of GtkEntry::populate-popup

Trivial commit.

The documentation block refers to @widget, not @popup. @widget is a
better name since the type is GtkWidget.

9 years agodocs: fix docs of functions to convert layout_index <-> text_index
Sébastien Wilmet [Fri, 25 Nov 2016 20:32:09 +0000 (21:32 +0100)]
docs: fix docs of functions to convert layout_index <-> text_index

Trivial commit.

The documentation was swapped. The documentation for the parameters and
the return values is good.

9 years agorendericon: Pass the scale factor when rendeirng textures
Benjamin Otte [Sat, 26 Nov 2016 10:51:30 +0000 (11:51 +0100)]
rendericon: Pass the scale factor when rendeirng textures

Fixes icon rendeirng on hidpi.

9 years agoAdwaita: make rubberband selection work again for libgd apps
Cosimo Cecchi [Fri, 25 Nov 2016 17:53:21 +0000 (18:53 +0100)]
Adwaita: make rubberband selection work again for libgd apps

libgd views still use the old style class.

9 years agoMake gtk-encode-symbolic-svg work for icons with dotted names
Matthias Clasen [Fri, 25 Nov 2016 13:55:33 +0000 (08:55 -0500)]
Make gtk-encode-symbolic-svg work for icons with dotted names

We were producing org.symbolic.png from org.gnome.Recipes-symbolic.svg,
which is not useful. Look for the last dot in the original name, to
produce the expected org.gnome.Recipes-symbolic.symbolic.png instead.

9 years agoBuild: Add wayland to GSKs dependencies
Dominique Leuenberger [Thu, 24 Nov 2016 18:50:34 +0000 (19:50 +0100)]
Build: Add wayland to GSKs dependencies

gskrenderer.c includes gdk/wayland/gdkwayland.h and as a consequence
we need to be able to locate wayland's headers in case they are not
in standard location.

https://bugzilla.gnome.org/show_bug.cgi?id=775038

9 years agogdk: Rewrite docs some more
Benjamin Otte [Thu, 24 Nov 2016 17:31:11 +0000 (18:31 +0100)]
gdk: Rewrite docs some more

Now gdk_window_process_updates() isn't mentioned either.

GDK takes care of redrawing, not you!

9 years agoinspector: Remove leftover GDK_PRIVATE_CALL()s
Benjamin Otte [Thu, 24 Nov 2016 14:41:19 +0000 (15:41 +0100)]
inspector: Remove leftover GDK_PRIVATE_CALL()s

9 years agogdk: Get rid of all mentions of process_all_updates()
Benjamin Otte [Thu, 24 Nov 2016 14:26:15 +0000 (15:26 +0100)]
gdk: Get rid of all mentions of process_all_updates()

9 years agowayland: Place subsurfaces relative to their parent
Olivier Fourdan [Wed, 23 Nov 2016 13:55:40 +0000 (14:55 +0100)]
wayland: Place subsurfaces relative to their parent

Now that subsurfaces can be created as child of another GdkWindow (and
not just the root window), they must be placed according to the location
of their parent, i.e. the abs_x/abs_y must be updated and taken int
account when placing and moving subsurfaces under Wayland.

https://bugzilla.gnome.org/show_bug.cgi?id=774917

9 years agogdk: Use stricter checks for begin_draw_frame()
Benjamin Otte [Thu, 24 Nov 2016 03:32:26 +0000 (04:32 +0100)]
gdk: Use stricter checks for begin_draw_frame()

We don't support drawing on child windows, so make sure nobody tries.

9 years agoDrop the GDK_PRIVATE_CALL mechanism
Matthias Clasen [Thu, 24 Nov 2016 00:31:16 +0000 (19:31 -0500)]
Drop the GDK_PRIVATE_CALL mechanism

We don't need to do this extra complication anymore, since
we're now living inside a single shared library.

9 years agoinspector: Respect text-scaling-factor value initially
Matthias Clasen [Thu, 24 Nov 2016 00:16:16 +0000 (19:16 -0500)]
inspector: Respect text-scaling-factor value initially

This was pointed out in
https://bugzilla.gnome.org/show_bug.cgi?id=774893

9 years agoGtkLabelAccessible: Initialize link before setting parent
Florian Müllner [Wed, 23 Nov 2016 15:34:15 +0000 (16:34 +0100)]
GtkLabelAccessible: Initialize link before setting parent

Since at-spi-atk commit 96621a5e95 fixed PropertyChange notifications
for AccessibleParent, setting the parent will result in a call to
ref_state_set() which assumes that the object is fully initialized.

https://bugzilla.gnome.org/show_bug.cgi?id=774939

9 years agoinspector: ensure controller is a GtkGesture
Christian Hergert [Sun, 20 Nov 2016 23:40:10 +0000 (15:40 -0800)]
inspector: ensure controller is a GtkGesture

While GtkEventController implementations today are all GtkGesture, it is
possible to create a GtkEventController manually. This is an extrac check
to ensure we only add gestures to the list.

https://bugzilla.gnome.org/show_bug.cgi?id=774760

9 years agoUpdate Russian translation
Stas Solovey [Wed, 23 Nov 2016 20:42:59 +0000 (20:42 +0000)]
Update Russian translation
(cherry picked from commit dd3cf38c53239cdd93f5ff887120ee453292fe5d)

9 years agomenu: Don't leak check menu items
Matthias Clasen [Wed, 23 Nov 2016 19:48:17 +0000 (14:48 -0500)]
menu: Don't leak check menu items

Pointed out in
https://bugzilla.gnome.org/show_bug.cgi?id=774686

9 years agonotebook: Don't leak arrow gadgets
Matthias Clasen [Wed, 23 Nov 2016 19:44:37 +0000 (14:44 -0500)]
notebook: Don't leak arrow gadgets

This was pointed out in
https://bugzilla.gnome.org/show_bug.cgi?id=774743

9 years agotext handle: Don't leak adjustments
Matthias Clasen [Wed, 23 Nov 2016 18:55:28 +0000 (13:55 -0500)]
text handle: Don't leak adjustments

This can happen if the weak pointer is triggered before the
adjustments are unset. Pointed out in

https://bugzilla.gnome.org/show_bug.cgi?id=774790

9 years agogdk: Only draw toplevels
Benjamin Otte [Wed, 23 Nov 2016 18:32:27 +0000 (19:32 +0100)]
gdk: Only draw toplevels

Simplify gdk_window_paint_on_clock () to only draw the toplevel. We do
no longer draw child windows and offscreens no longer exist.

9 years agoAPI: Remove gdk_window_process_all_updates()
Benjamin Otte [Wed, 23 Nov 2016 18:10:34 +0000 (19:10 +0100)]
API: Remove gdk_window_process_all_updates()

It's completely unused since we have a frame clock.

9 years agoAPI: gdk: Remove gdk_window_process_updates()
Benjamin Otte [Wed, 23 Nov 2016 18:02:58 +0000 (19:02 +0100)]
API: gdk: Remove gdk_window_process_updates()

We have a frame clock now.